package com.lmt_9;

import java.util.LinkedList;

public class Stack {
    public static void main(String[] args) {
        LinkedList<String> queue = new LinkedList<>();
        queue.addLast("q");
        queue.addLast("v");
        queue.addFirst("mm");
        System.out.println(queue);

        System.out.println("====================");
        LinkedList<String> stack = new LinkedList<>();
        stack.addFirst("第一颗子弹");
        stack.addFirst("第二颗子弹");
        stack.addFirst("第三颗子弹");

        System.out.println(stack);
        stack.pop(); // 出栈
        System.out.println(stack);
    }
}
